package com.ddwl.common.dao.mapper;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

@tk.mybatis.mapper.annotation.RegisterMapper
public interface TkMapper<T> extends Mapper<T>, MySqlMapper<T> {



    /**
     * 批量插入，支持批量插入的数据库可以使用
     *
     * @param recordList
     * @return
     */
    @Options(useGeneratedKeys = true)
    @InsertProvider(type = InsetListProvider.class, method = "dynamicSQL")
    int insertListNoSkipId(List<? extends T> recordList);
}
